package com.tupu.entity.dto;


import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.tupu.common.BooleanIntConverter;
import com.tupu.common.ValidResultIntConverter;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class PointDO {
    @ExcelIgnore
    @ExcelProperty("id")
    @ColumnWidth(20)
    private Integer problemId;

    @ExcelProperty("厂站")
    @ColumnWidth(15)
    private String station;

    @ExcelIgnore
    @ExcelProperty("厂站NO")
    @ColumnWidth(10)
    private Integer stationNo;

    @ExcelIgnore
    @ExcelProperty("消息类型")
    @ColumnWidth(20)
    private String messageType;

    @ExcelProperty("设备名称")
    @ColumnWidth(30)
    private String deviceName;

    @ExcelIgnore
    @ExcelProperty("设备类型")
    @ColumnWidth(15)
    private String deviceType;

    /**
     * 设备类型编码
     */
    @ExcelIgnore
    @ColumnWidth(10)
    @ExcelProperty("设备类型编码")
    private String deviceTypeCode;

    @ExcelIgnore
    @ExcelProperty("设备id")
    @ColumnWidth(10)
    private Integer deviceId;

    @ExcelProperty("点名")
    @ColumnWidth(25)
    private String pointName;

    @ExcelProperty("信息类型")
    @ColumnWidth(25)
    private String informationType;

    @ExcelIgnore
    @ExcelProperty("对应设备名称规范")
    @ColumnWidth(25)
    private String standardName;

    @ExcelProperty("规范信息描述")
    @ColumnWidth(30)
    private String standardDesc;

    @ExcelProperty("校验规则")
    @ColumnWidth(30)
    private String checkRules;

    @ExcelProperty(value = "校验结果", converter = ValidResultIntConverter.class)
    @ColumnWidth(12)
    private String validResult;

    @ExcelProperty(value = "主站合并", converter = BooleanIntConverter.class)
    @ColumnWidth(12)
    private String mainMerge;

    @ExcelIgnore
    @ExcelProperty("操作")
    @ColumnWidth(20)
    private Integer isTrain;

    //@ExcelProperty(value = "操作", converter = BooleanIntConverter.class)
    //@ColumnWidth(10)
    //private String mainMerge;

    @ExcelProperty("记录时间")
    @ColumnWidth(20)
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private LocalDateTime recordTime;

    @ExcelIgnore
    private LocalDateTime createTime;

    @ExcelIgnore
    private Double similarity;
}
